package com.ziilion;

import android.app.AlertDialog;
import android.app.TabActivity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.widget.FrameLayout;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;


public class AppMain extends TabActivity  {
 TabHost mTabHost;
 FrameLayout mFrameLayout;
 
 public static String ipAddr = "10.128.170.36"; 
 public static int port = 10012;

 /** Called when the activity is first created.*/
 @Override
 	public void onCreate(Bundle savedInstanceState) {
	 

		super.onCreate(savedInstanceState);
	    setContentView(R.layout.main);
	    mTabHost = getTabHost();
	    
	    TabSpec tspec1 = mTabHost.newTabSpec("Map");
	    tspec1.setIndicator("Map", getResources().getDrawable(R.drawable.ic_mapmode));
	    Context ctx = this.getApplicationContext();
	    Intent i = new Intent(ctx, MyMap.class);
	    tspec1.setContent(i);
	    mTabHost.addTab(tspec1); 
	    
	    TabSpec tspec2 = mTabHost.newTabSpec("Zii");
	    tspec2.setIndicator("Zii", getResources().getDrawable(R.drawable.ic_energy));
	    Context ctx2 = this.getApplicationContext();
	    Intent i2 = new Intent(ctx2, Zii.class);
	    tspec2.setContent(i2);
	    mTabHost.addTab(tspec2); 
	    
	    TabSpec tspec3 = mTabHost.newTabSpec("Nearby");
	    tspec3.setIndicator("Nearby", getResources().getDrawable(R.drawable.ic_settings));
	    Context ctx3 = this.getApplicationContext();
	    Intent i3 = new Intent(ctx3, Nearby.class);
	    tspec3.setContent(i3);
	    mTabHost.addTab(tspec3); 
	    
	    mTabHost.setCurrentTab(0);
 }
}
